package com.tao.util.pack;

import com.tao.util.pack.HeartBeatThread.OnExitMsgListener;
import com.tao.util.pack.HeartBeatThread.OnNewMsgListener;
import com.tao.util.pack.WaitScanAndLoginThread.OnScanListener;
import com.tao.util.pack.WeChatClass.OnContentListener;
import com.tao.util.pack.WeChatClass.OnInitMsgListener;

public class WeeeeeChatDemo {

	public WeeeeeChatDemo() {
		WeChatClass weChat=new WeChatClass();
		weChat.setmScanListener(new OnScanListener() {
			
			@Override
			public void onSure() {
				System.out.println("登陆成功");
			}
			
			@Override
			public void onScan() {
				System.out.println("已经扫描成功，等待确认登陆");
				
			}
		});
		weChat.setmNewMsgListener(new OnNewMsgListener() {
			
			@Override
			public void onNewMsg(String text) {//只处理群消息
				System.out.println("接收到消息:"+text);
				
			}

			@Override
			public void startBeat(String uin) {
				System.out.println("开始心跳");
				
			}
		});
		weChat.setmExitMsgListener(new OnExitMsgListener() {
			
			@Override
			public void onExitMsg(String text) {
				System.out.println(text+"用户已退出");
				
			}
		});
		weChat.setmInitMsgListener(new OnInitMsgListener() {
			
			@Override
			public void onInitMsg(String text,String[] s) {
				System.out.println(text);
				
			}
		});
      weChat.setmContentListener(new OnContentListener() {
		
		@Override
		public void onContentMsg(String text,String uin) {
			System.out.println(text);
			
		}
	});
		
		weChat.gogogo();
		
		
	}
	public static void main(String[] args) {
		WeeeeeChatDemo e= new WeeeeeChatDemo();
	}

}
